//
//  athemPlayer.h
//  _2010WorldCupNationalAthem
//
//  Created by Apple on 2010/7/13.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

#import "config.h"

#ifdef FOR_IOS4_ONLY
#import <iAd/iAd.h>
#endif

@interface athemPlayer : UIViewController 
<AVAudioPlayerDelegate
#ifdef FOR_IOS4_ONLY
	,ADBannerViewDelegate
#endif
>
{
	// 指到 上一層ViewController 傳來的pointer, 由 上一層ViewController 負責release
	NSString * countryNameToPlay ;
	NSString * countryNameToShow ;
	
	IBOutlet UIImageView * countryImage ;
	
	NSUInteger play_flag ;	// 1: playing   0: pause
	IBOutlet UIButton * playPauseButton ;
	
	AVAudioPlayer* player ;
	
	//NSUInteger alertCounter ;
	
#ifdef FOR_IOS4_ONLY

	// IAD relative
	// 
	IBOutlet ADBannerView * adView ;
	BOOL bannerIsVisible ;
#endif
}

@property (nonatomic,retain) NSString * countryNameToPlay ;
@property (nonatomic,retain) NSString * countryNameToShow ;

@property (nonatomic,retain) IBOutlet UIImageView * countryImage ;
@property (nonatomic,retain) IBOutlet UIButton * playPauseButton ;


#ifdef FOR_IOS4_ONLY
	@property (nonatomic,assign) BOOL bannerIsVisible ;
	@property (nonatomic,retain) IBOutlet ADBannerView * adView ;
#endif

-(IBAction)playOrPause:(id)sender;
 


// this method would be called by 上一層ViewController
//
- (void) setCountryName:(NSString *)name1 nameToShow:(NSString *)name2 ;

@end
